package com.pointcircle.core;

import org.hibernate.dialect.PostgreSQL9Dialect;
import org.hibernate.dialect.function.SQLFunctionTemplate;
import org.hibernate.type.StringType;

public class PGSQLExtendDialect extends PostgreSQL9Dialect{
	
	public PGSQLExtendDialect() {
		super();
		this.registerFunction("convert_gbk", 
			new SQLFunctionTemplate(StringType.INSTANCE, "convert_to(?1, 'gbk')"));
	}
}
